/**
 * 
 */
package com.talentech.xproberlib;

/**
 * @author LF
 *
 */
public class NameJudge
{
	static NameJudger all = new NameJudger()
	{
		@Override
		public boolean judge(String name)
		{
			return noBoring.judge(name);
		}
	};
	
	static NameJudger onXXX = new NameJudger()
	{
		@Override
		public boolean judge(String name)
		{
			if(!noBoring.judge(name))
			{
				return false;
			}
			if(!name.startsWith("on"))
			{
				return false;
			}
			
			return true;
		}
	};
	
	static NameJudger noBoring = new NameJudger()
	{
		@Override
		public boolean judge(String name)
		{
			if (name.equals("toString") || name.equals("getId") || name.equals("hashCode") || name.equals("equals"))
			{
				return false;
			}
			return true;
		}
	};
}
